home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Hardware.h
-
- Contains: Headers for routines for dealing with virtual sound hardware from a
- 'sdev' component.
-
- Written by: Mark Cookson
-
- Copyright: Copyright © 1993-1999 by Apple Computer, Inc., All Rights Reserved.
-
- You may incorporate this Apple sample source code into your program(s) without
- restriction. This Apple sample source code has been provided "AS IS" and the
- responsibility for its operation is yours. You are not permitted to redistribute
- this Apple sample source code as "Apple sample source code" after having made
- changes. If you're going to re-distribute the source, we require that you make
- it clear in the source that the code was descended from Apple sample source
- code, but that you've made changes.
-
- Change History (most recent first):
- 8/16/1999 Karl Groethe Updated for Metrowerks Codewarror Pro 2.1
-
-
- */
-
- #ifndef __HARDWARE__
- #define __HARDWARE__
-
- #include <Errors.h>
- #include <Script.h>
- #include <SoundInput.h>
-
- #ifndef __STRUCTURES__
- #include "Structures.h"
- #endif
-
- #define kCreator 'Nqst'
- #define kFileType 'AIFF'
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Prototypes
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- OSErr SetupHardware(SoundComponentGlobalsPtr globals);
- void ReleaseHardware(SoundComponentGlobalsPtr globals);
- void StartHardware(SoundComponentGlobalsPtr globals);
- void StopHardware(SoundComponentGlobalsPtr globals);
- void SuspendHardware(SoundComponentGlobalsPtr globals);
- void ResumeHardware(SoundComponentGlobalsPtr globals);
- void CopySamplesToHardware(SoundComponentGlobalsPtr globals, SoundComponentDataPtr siftPtr);
- void OutputToFile(SoundComponentGlobalsPtr globals, SoundComponentDataPtr siftPtr, void *dest, short sampleCount);
- Boolean FakeInterrupt(void);
- void InterruptRoutine(SoundComponentGlobalsPtr globals);
- SoundComponentDataPtr GetMoreSource(SoundComponentGlobalsPtr globals);
- OSErr SetupOutputFile(SoundComponentGlobalsPtr globals);
- OSErr CloseOutputFile(SoundComponentGlobalsPtr globals);
- Handle NewHandleLockClear(long len, Boolean inSystemHeap);
- HardwareGlobalsPtr GetHardwareGlobals(ComponentInstance self, Boolean inSystemHeap);
- OSErr SaveHardwareGlobals(ComponentInstance self, HardwareGlobalsPtr hwGlobals);
-
- #if !GENERATINGPOWERPC
- void TMInterrupt(myTMTaskPtr taskPtr:__a1);
- unsigned long MicroSeconds(void) = { 0xA193 };
- #else
- void TMInterrupt(myTMTaskPtr taskPtr);
- unsigned long MicroSeconds(void);
- #endif
-
- #endif //#ifndef __HARDWARE__